/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

/**
 *
 * @author eduardo.lopes
 */
public class Word implements Comparable<Object> {
    private String word;
    private int count;

    public Word(String word) {
        this.word = word;
        this.count = 0;
    }

    /**
     * @return the word
     */
    public String getWord() {
        return word;
    }

    /**
     * @param word the word to set
     */
    public void setWord(String word) {
        this.word = word;
    }

    @Override
    public boolean equals(Object obj) {
        if(!(obj instanceof Word)) return false;
        Word w = (Word)obj;
        if(this.getWord().equals(w.getWord())) return true;
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 53 * hash + (this.word != null ? this.word.hashCode() : 0);
        return hash;
    }

    /**
     * @return the count
     */
    public int getCount() {
        return count;
    }

    /**
     * @param count the count to set
     */
    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public int compareTo(Object o) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
